package net.zjitc.android2019;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import net.zjitc.android2019.ch2activity.Ch2activitymain;

public class MainActivity extends AppCompatActivity {
    private Button btn_1, btn_2, btn_3, btn_4, btn_5, btn_6;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_allproject);
        init();
        View.OnClickListener click = new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                switch (v.getId()) {
                    case R.id.btn_UI:
                        break;
                    case R.id.btn_activtymain:
                        activtymain();
                        break;
                    case R.id.btn_data_stoyrage:
                        break;
                    case R.id.btn_neirong:
                        break;
                    case R.id.btn_broadcast:
                        break;
                    case R.id.btn_serve:
                        break;
                }
            }
        };
        btn_1.setOnClickListener(click);
        btn_2.setOnClickListener(click);
        btn_3.setOnClickListener(click);
        btn_4.setOnClickListener(click);
        btn_5.setOnClickListener(click);
    }

    private void activtymain() {
        Intent intent = new Intent(MainActivity.this,Ch2activitymain.class);
        startActivity(intent);
    }

    private void init() {
        btn_1 = findViewById(R.id.btn_UI);
        btn_2 = findViewById(R.id.btn_activtymain);
        btn_3 = findViewById(R.id.btn_data_stoyrage);
        btn_4 = findViewById(R.id.btn_neirong);
        btn_5 = findViewById(R.id.btn_broadcast);
        btn_6 = findViewById(R.id.btn_serve);
    }


}
